/**  
 * All rights Reserved, Designed By <a href="www.itttq.com" target="_blank">www.itttq.com</a>
 * @date:   2017-07-21 11:42:21
 * @Copyright: 2017 <a href="www.itttq.com" target="_blank">www.itttq.com</a> Inc. All rights reserved. 
 */
package com.itttq.gshop.pbpm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.itttq.gshop.domain.po.SysFloorImgPo;
import com.itttq.gshop.domain.to.ResultPageTo;
import com.itttq.gshop.pbpm.mapper.ISysFloorImgMapper;

@Service
public class SysFloorImgService {
	@Autowired
	private ISysFloorImgMapper sysFloorImgMapper;
	
	/**
	 * 根据ID获取SysFloorImgPo对象
	 * 
	 * @param id
	 * @return
	 * @Author 迷蝶
	 * @return SysFloorImgPo
	 */
	public SysFloorImgPo getSysFloorImg(int id) {
		return sysFloorImgMapper.findSysFloorImgById(id);
	}
	
	/**
	 * 根据条件获取SysFloorImgPo对象，并返回查询的数据总数
	 * 
	 * @param sysFloorImg
	 * @Author 迷蝶
	 * @return ResultPageTo<SysFloorImgPo>
	 */
	public ResultPageTo<SysFloorImgPo> getSysFloorImgs(SysFloorImgPo sysFloorImg) {
		return new ResultPageTo<SysFloorImgPo>(sysFloorImg.getStart(), sysFloorImg.getSize(), 
				sysFloorImgMapper.findSysFloorImgCount(sysFloorImg), sysFloorImgMapper.findSysFloorImgs(sysFloorImg));
	}
	
	/**
	 * 根据ID删除SysFloorImgPo对象
	 * 
	 * @param id
	 * @Author 迷蝶
	 */
	public Integer delSysFloorImg(int id) {
		return sysFloorImgMapper.delSysFloorImgById(id);
	}
	
	/**
	 * 增加SysFloorImgPo对象
	 * 
	 * @param sysFloorImg
	 * @Author 迷蝶
	 */
	public Integer addSysFloorImg(SysFloorImgPo sysFloorImg) {
		return sysFloorImgMapper.addSysFloorImg(sysFloorImg);
	}
	
	/**
	 * 根据条件更新SysFloorImgPo对象
	 * 
	 * @param sysFloorImg
	 * @Author 迷蝶
	 */
	public Integer updateSysFloorImg(SysFloorImgPo sysFloorImg) {
		return sysFloorImgMapper.updateSysFloorImg(sysFloorImg);
	}
	
}
